import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [{
    path: "/",
    redirect: "/home",
  },
  {
    path: "/index",
    name: "Index",
    component: () => import("../views/home/Index.vue"),
    children: [{
        path: "/home",
        name: "Home",
        component: () => import("../views/home/Home.vue"),
      },
      {
        path: "/list",
        name: "List",
        component: () => import("../views/list/List.vue"),
      },
      {
        path: "/shopcar",
        name: "Shopcar",
        component: () => import("../views/home/Shopcar.vue"),
      }, {
        path: "/my",
        name: "My",
        component: () => import("../views/home/My.vue"),
      },
    ]
  },
  {
    path: "/bargain",
    name: "Bargain",
    component: () => import("../views/home/Bargain.vue"),
  },
  {
    path: "/Choiceness",
    name: "Choiceness",
    component: () => import("../views/home/Choiceness.vue"),
  },
  {
    path: "/popularity",
    name: "Popularity",
    component: () => import("../views/home/Popularity.vue"),
  },
  {
    path: "/choiceness-detail",
    name: "Choiceness-detail",
    component: () => import("../views/home/Choiceness-detail.vue"),
  },
  {
    path: "/sign",
    name: "Sign",
    component: () => import("../views/home/Sign.vue"),
  },
  {
    path: "/gift",
    name: "Gift",
    component: () => import("../views/home/Gift.vue"),
  },
  {
    path: "/login",
    name: "Login",
    component: () => import("../views/home/Login.vue"),
  },
  {
    path: "/popHomeDetail",
    name: "PopHomeDetail",
    component: () => import("../views/home/PopHomeDetail.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;